import requests as rs
import subprocess

# 服务器地址，修改此处
remote_url = "localhost"

mac_list = eval(rs.get('http://{}:10888/need_wake_mac'.format(remote_url)).text)

for mac in mac_list:
    sp_res = subprocess.getstatusoutput("wakeonlan " + mac)
    # print(sp_res)
